#import "Reactor.h"
#import "Player.h"

@interface Reactor ()

@property (readwrite) Player* playerOne;
@property (readwrite)Player* playerTwo;
@property (readwrite)Settings* settings;

@end

@implementation Reactor

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.settings=[Settings sharedSettings];
    }
    return self;
}

-(void)setPlayerOneName:(NSString*)playerOneName
          playerTwoName:(NSString*)playerTwoName {
    self.playerOne=[[Player alloc]initWithName:playerOneName];
    self.playerTwo=[[Player alloc]initWithName:playerTwoName];
}

+(instancetype)sharedReactor {
    static Reactor* reactor = nil;
    if (!reactor)
        reactor = [[super alloc] init];
    
    return reactor;
}


+(id)alloc {
    return [Reactor sharedReactor];
}

-(id)copy {
    return [Reactor sharedReactor];
}

-(id)mutableCopy {
    return [Reactor sharedReactor];
}



@end
